
#https://github.com/youngwanLEE/vovnet-detectron2
#https://arxiv.org/pdf/1904.09730v1.pdf
#https://arxiv.org/pdf/1911.06667.pdf
#__all__ = ['VoVNet', 'vovnet27_slim', 'vovnet39', 'vovnet57']


model_urls = {
    'vovnet39': 'https://dl.dropbox.com/s/1lnzsgnixd8gjra/vovnet39_torchvision.pth?dl=1',
    'vovnet57': 'https://dl.dropbox.com/s/6bfu9gstbwfw31m/vovnet57_torchvision.pth?dl=1'
}

import torch
import torch.nn as nn
import timm
class VoVNet(nn.Module):
    def __init__(self):
        super(VoVNet, self).__init__()
        self.m = timm.create_model('ese_vovnet19b_dw', pretrained=True,features_only=True)



    def forward(self, x):
        x = self.m(x)
        output = x[-3:]

        return tuple(output)

    def init_weights(self):
        pass

if __name__ == '__main__':
    net = VoVNet()
    x = torch.randn(2, 3, 224, 224)
    x= net(x)
    for i in x:
        print(i.shape)
